using System;
using System.Collections;
using System.Collections.Generic;
using Editor.ConfigExport.UI;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;

public class Excel2ScriptableObject : EditorWindow
{
    private static Excel2ScriptableObject window;
    private ExcelExportCtl _ctl;
    [MenuItem("Tools/excel_export_2_SriptableObjectManager")]
    public static void openConfigWindow()
    {
        window = GetWindow<Excel2ScriptableObject>(false,"excel导出配置",true);
        window.Show();
    }

    private void CreateGUI()
    {
        var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("Assets/Editor/ConfigExport/UI/ExcelExportWindow.uxml");
        VisualElement instance = visualTree.Instantiate();
        if (_ctl == null)
        {
            _ctl = new ExcelExportCtl();
            _ctl.setRootElement(instance);
        }
        
        rootVisualElement.Add(instance);
    }
}
